<template>
  <div class="right">
    <h3>这是一个Right组件</h3>
    <p>x坐标点:{{point.x}},y坐标点:{{point.y}}</p>
  </div>
</template>

<script>
import myPoint from '../hooks/myPoint';
import { onBeforeUnmount, onMounted, onUnmounted, reactive } from 'vue';
export default {
  name: 'Right',
  setup() {
    onBeforeUnmount(() => {
      console.log('onBeforeUnmount执行了');
    });
    onUnmounted(() => {
      console.log('onUnmounted执行了');
    });

    let point = myPoint();
    return {
      point
    };
  }
};
</script>

<style scoped>
.right {
  width: 300px;
  height: 200px;
  background-color: orange;
  color: #fff;
}
</style>